<template  xmlns:el-form-item="http://www.w3.org/1999/xhtml">
  <el-form ref="ruleFrom" :model="ruleFrom"  label-width="100px">
    <el-page-header content="详情页" @back="goBack" />
    <el-row style="margin-top: 30px">
      <!--基本输入框-->
      <el-col :span="5">
        <el-form-item label="编号:" prop="name1">
          {{ruleFrom.prescriptionId}}
        </el-form-item>
      </el-col>
      <!--基本单选框-->
      <el-col :span="5">
        <el-form-item label="发药人：" prop="name2">
          {{ruleFrom.prnName}}
        </el-form-item>
      </el-col>
      <el-col :span="5">
        <el-form-item label="发药时间：" prop="name2">
          {{ruleFrom.prnTime}}
        </el-form-item>
      </el-col>
      <!--基本多选框-->
    </el-row>
    <!--上传文件-->
    <el-row>
      <el-col :span="20">
        <el-form-item label="药品数据" prop="fileName">

        </el-form-item>
      </el-col>


    </el-row>
    <!--数据表格-->
    <el-row>
      <el-col :span="24">
        <el-form-item>
          <el-table
              :data="ruleFrom.zsxClincPrnDetails.slice((currentPage-1)*pagesize,currentPage*pagesize)"
              style="width: 100%;margin-left: -50px">
            <template  #default="scope">
              <el-table-column
                  prop="clincPrnDetailsDrugId"
                  label="详情编号">
              </el-table-column>
              <el-table-column
                  prop="drugEntity.drugName"
                  label="药品名称">
              </el-table-column>
              <el-table-column
                  prop="clincPrnDetailsDrugPrice"
                  label="小计">
              </el-table-column>
              <el-table-column
                  prop="clincPrnDetailsDrugNumber"
                  label="数量">
              </el-table-column>
              <el-table-column
                  prop="clincPrnDetailsDrugNotes"
                  label="注意事项">
              </el-table-column>
              <el-table-column
                  prop="clincPrnNumber"
                  label="执行号">
              </el-table-column>
            </template>
          </el-table>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>

import qs from "qs";
import http, {service} from "@/http/request";

export default {
  data() {
    return {
      reverse: true,
      tableDate:[],
      customerData: [],
      ruleFrom:{
        prnTime:"",
        prnName:'',
        clincPrnAttention:"",
        zsxClincPrnDetails:[],
      },
      currentPage:1, //初始页
      pagesize:10,    //    每页的数据
      tableDetails:[],
    }


  },

  methods: {
    // 跳转返回指定的页面
    goBack() {
      this.$router.push({
        path: '/recipe'
      })
    },


    // 初始页currentPage、初始每页数据数pagesize和数据data
    handleSizeChange: function (size) {
      this.pagesize = size;
      console.log(this.pagesize)  //每页下拉显示数据
    },
    handleCurrentChange: function(currentPage){
      this.currentPage = currentPage;
      console.log(this.currentPage)  //点击第几页
    },



  },

  created() {

    this.ruleFrom=JSON.parse(this.$route.query.value);

  }

}
</script>


<style scoped>
.whiteSelectBg .el-input.is-disabled .el-input__inner{
  background-color: white;
  color:#606266;
}
*{
  margin: 0px;
  padding: 0px;
}
.xq{
  width: 100%;

  background-color:#E9EEF3;
  padding-top:100px;
  padding-bottom: 100px;
}
.max_box{
  width:100%;
  height:500px;
  margin:auto;
  background-color: #E9EEF3;
}
.xia_box{
  width:850px;
  height:500px;
  background: white;
  margin-left: 360px;
  margin-top: 10px;

}


</style>















